package main

import "fmt"

type Student struct {
	name string
}

func (this Student)getInfo()(name string)  {
	name = this.name
	return
}

func main() {
	stu := Student{"Mr"}
	// 方法表达式
	meth := (Student).getInfo
	fmt.Println(meth(stu))

	// 值表达式
	meth2 := stu.getInfo
	fmt.Println(meth2())
}


